package com.sxdx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author xj
 * @since 2023-12-22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("dx_menu")
public class Menu implements Serializable {
    //追加的List<Menu>集合属性 -- 用于存储当前权限(菜单)的子级权限(菜单)
    private List<Menu> childMenu;

    private static final long serialVersionUID = 1L;

    @TableId(value = "menu_id", type = IdType.NONE)
    private String menuId;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 父菜单
     */
    private String parentId;

    /**
     * 路由地址
     */
    private String component;

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }
    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }
    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    @Override
    public String toString() {
        return "Menu{" +
            "menuId=" + menuId +
            ", menuName=" + menuName +
            ", parentId=" + parentId +
            ", component=" + component +
        "}";
    }
}
